import MixinUtil from '../utils/mixin-util'

/*
    构造mixin对象
    data：原始数据
    mixin：织入对象
 */

export const yesOrNoConstants = MixinUtil.makeConstants(
  'yesOrNoConstants',
  {
    // 订单类型：1：yes 0 no
    yes: { key: 1, value: '是' },
    no: { key: 0, value: '否' }
  }
)

export const sortTypeContants = MixinUtil.makeConstants(
  'sortTypeContants',
  {
    // 结算状态,0未返佣，1已返佣
    asc: { key: 1, value: '顺序' },
    desc: { key: 2, value: '倒序' }
  }
)

export const smsCaptchaTypeContants = MixinUtil.makeConstants(
  'smsCaptchaTypeContants',
  {
    // 验证码类型：1 登录 2 注册 3 忘记密码 4 绑定手机号
    login: { key: '1', value: '登录' },
    reg: { key: '2', value: '注册' },
    forget: { key: '3', value: '忘记密码' },
    bind: { key: '4', value: '绑定手机号' }
  }
)

export const ClipStatusContants = MixinUtil.makeConstants(
  'ClipStatusContants',
  {
    wait: { key: 0, value: '处理中' },
    succ: { key: 1, value: '处理成功' },
    fail: { key: 2, value: '处理失败' }
  }
)

export const ClientTypeContants = MixinUtil.makeConstants(
  'ClientTypeContants',
  {
    android: { key: 0, value: '安卓' },
    ios: { key: 1, value: 'IOS' },
    h5: { key: 2, value: 'H5' }
  }
)

export const ClipVideoTypeContants = MixinUtil.makeConstants(
  'ClipVideoTypeContants',
  {
    m3u8: { key: 0, value: 'm3u8地址', show: true },
    mp4: { key: 1, value: 'mp4视频', show: false }
  }
)

export const ClipListSourceTypeContants = MixinUtil.makeConstants(
  'ClipListSourceTypeContants',
  {
    self: { key: 0, value: '自助', canClear: true },
    text: { key: 1, value: '基于文本', canClear: false },
    audio: { key: 2, value: '基于音频', canClear: false }
    // mp4: { key: 1, value: 'mp4视频' }
  }
)

export const VideoStatusContants = MixinUtil.makeConstants(
  'VideoStatusContants',
  {
    0: { key: 0, value: '剪辑中' },
    1: { key: 1, value: '已完成' }
  }
)

export const MeterialClipTypeContants = MixinUtil.makeConstants(
  'MeterialClipTypeContants',
  // 剪辑输出类型：1 视频 2 音频
  {
    1: { key: 1, value: '视频' },
    2: { key: 2, value: '音频' }
  }
)
export const sourceFormat = MixinUtil.makeConstants(
  'sourceFormat',
  // 来源
  {
    0: { key: 0, value: '本地上传' },
    1: { key: 1, value: '录播推送' },
    2: { key: 2, value: '媒资剪辑' },
    3: { key: 3, value: '本地短视频上传' },
    4: { key: 4, value: 'APP发布' }
  }
)
export const watermarkFormat = MixinUtil.makeConstants(
  'watermarkFormat',
  // 水印状态
  {
    '-1': { key: '-1', value: '无水印' },
    0: { key: 0, value: '水印生成中' },
    1: { key: 1, value: '已生成水印' },
    2: { key: 2, value: '水印生成失败' }
  }
)
export const lenTypeFormat = MixinUtil.makeConstants(
  'lenTypeFormat',
  // 节目类型
  {
    0: { key: 0, value: '短视频' },
    1: { key: 1, value: '中视频' },
    2: { key: 2, value: '长视频' }
  }
)
export const bizTypeFormat = MixinUtil.makeConstants(
  'bizTypeFormat',
  // 发布人
  {
    1: { key: 1, value: '媒资' },
    2: { key: 2, value: '小管家' },
    3: { key: 3, value: '主持人' },
    4: { key: 4, value: '广告' },
    5: { key: 5, value: '用户' },
    6: { key: 6, value: '活动' },
    7: { key: 7, value: '频率上传' }
  }
)
export const downStatusFormat = MixinUtil.makeConstants(
  'downStatusFormat',
  // 下载状态
  {
    0: { key: 0, value: '下载中' },
    1: { key: 1, value: '下载完成' },
    2: { key: 2, value: '下载失败' }
  }
)
export const clipStatusFormat = MixinUtil.makeConstants(
  'clipStatusFormat',
  // 剪辑状态
  {
    '-1': { key: '-1', value: '未剪辑' },
    0: { key: 0, value: '剪辑中' },
    1: { key: 1, value: '剪辑成功' },
    2: { key: 2, value: '剪辑失败' }
  }
)
export const audioStatusFormat = MixinUtil.makeConstants(
  'audioStatusFormat',
  // 审核状态
  {
    '-1': { key: '-1', value: '待提交审核' },
    0: { key: 0, value: '审核中' },
    1: { key: 1, value: '审核通过' },
    2: { key: 2, value: '审核不通过' }
  }
)
export const audioStatusFilter = MixinUtil.makeConstants(
  'audioStatusFilter',
  // 搜索审核状态
  {
    'undefined': { key: undefined, value: '全部' },
    0: { key: 0, value: '待审核' },
    1: { key: 1, value: '审核通过' },
    2: { key: 2, value: '审核不通过' }
  }
)
export const inStockStatusFormat = MixinUtil.makeConstants(
  'inStockStatusFormat',
  // 入库状态
  {
    '-1': { key: '-1', value: '待提交入库' },
    0: { key: 0, value: '待入库' },
    1: { key: 1, value: '入库成功' },
    2: { key: 2, value: '入库失败' }
  }
)
export const taskSourceFormat = MixinUtil.makeConstants(
  'taskSourceFormat',
  // 任务来源状态
  {
    0: { key: 0, value: 'm3u8上传' },
    1: { key: 1, value: '本地上传' },
    other: { key: 2, value: '媒资库选择' }
  }
)
